<?php if(count($this->messages->getMessages())>0):?>
<h3 style="color:#FFCB3F"><?php echo current($this->messages->getMessages()); ?>&nbsp;</h3>
<?php endif;?>
<h3><?php echo $this->escape($this->title); ?></h3>

<!-- links -->
<p><a href="<?php echo $this->baseUrl; ?>/cliente/nuevo">Nuevo Cliente</a></p>
<p><a href="<?php echo $this->baseUrl; ?>/cliente/editar">Editar Cliente</a></p>
<p><a href="<?php echo $this->baseUrl; ?>/cliente/eliminar">Eliminar Cliente</a></p>
<p><a href="<?php echo $this->baseUrl; ?>/cliente/mostrar">Mostrar Cliente</a></p>
<p><a href="<?php echo $this->baseUrl; ?>/cliente/buscar">Buscar Cliente</a></p>

<!-- los clientes -->
<table>
<tr>
<th>Razon Social</th>
<th>Tipo de Documento</th>
<th>Numero de Documento</th>
<th>Numero de Telefono</th>
<th>Correo Electronico</th>
<th>Domicilio</th>
<th>Localidad</th>
<th>Provincia</th>
<th>&nbsp;</th>
</tr>
<?php foreach($this->clientes as $clienteActual) : ?>
<tr>
<td><?php echo $this->escape($clienteActual->getRazonSocial());?></td>
<td><?php echo $this->escape($clienteActual->getTipoDocumento());?></td>
<td><?php echo $this->escape($clienteActual->getNumeroDocumento());?></td>
<td><?php echo $this->escape($clienteActual->getNroTelefono());?></td>
<td><?php echo $this->escape($clienteActual->getEmail());?></td>
<td><?php echo $this->escape($clienteActual->getDomicilio());?></td>
<td><?php echo $this->escape($clienteActual->getLocalidad()->getNombre());?></td>
<td><?php echo $this->escape($clienteActual->getLocalidad()->getProvincia()->getNombre());?></td>
<td>
    <a href="<?php echo $this->baseUrl; ?>/cliente/editar/id/<?php echo $clienteActual->getPK();?>">Editar</a>
    <a href="<?php echo $this->baseUrl; ?>/cliente/eliminar/id/<?php echo $clienteActual->getPK();?>" onclick="return confirm('¿Está seguro que desea eliminar al cliente <?php echo $this->escape($clienteActual->getRazonSocial());?>?')">Eliminar</a>
</td>
</tr>
<?php endforeach; ?>
</table>
